import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:search_people/value/topcolors.dart';
import 'package:webview_flutter/webview_flutter.dart';

import 'index.dart';
import 'widgets/widgets.dart';

class RelationPage extends GetView<RelationController> {
  const RelationPage({Key? key}) : super(key: key);

  // 主视图
  Widget _buildView() {
    return WebViewWidget(controller: controller.state.wc);
    // return WebView(controller: controller.state.wc);
  }

  @override
  Widget build(BuildContext context) {
    return GetBuilder<RelationController>(
      builder: (_) {
        return Scaffold(
          body: SafeArea(
            child: Stack(
              children: [
                _buildView(),
                Positioned(
                    left: 0,
                    top: 0,
                    child: InkWell(
                      onTap: Get.back,
                      child: Icon(
                        Icons.chevron_left,
                        color: TopColors.main_color,
                        size: 60.r,
                      ),
                    ))
              ],
            ),
          ),
        );
      },
    );
  }
}
